Xbasic
!$ (Substring Exclusion Operator)
Syntax
Result as L = Find_String as C !$ Search_String as C
Arguments
- Find_StringCharacter
The character string that you are looking for.
- Search_StringCharacter
The character string to examine.
Returns
- ResultLogical
Returns .t. if Search_String is not found in Find_String, otherwise .f.
Description
The !$ operator determines whether the character expression on the left of the operator is not contained anywhere within the character expression on the right.
Discussion
Operations involving the !$ operator return a logical result (i.e., TRUE or FALSE). The string comparison is not case sensitive. See also Character Search Functions.
Example:
If Company contains "The Computer Store"
dim Company as C Company = "The Computer Store" ? "Computer" !$ Company = .F. ? "computer" !$ Company = .F. ? "Alpha" !$ Company = .T.
The !$ does a case-insensitive comparison. EG:
? "Computer" !$ COMPANY = .F. ? "computer" !$ COMPANY = .F. ? "computer" !$ LOWER(COMPANY) = .F.
See Also